package com.cloud.order.Feign;

import model.bean.Product;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @author 韩先楚
 */
@Component
public class OrderCallBackOpenfeign implements ProductFeignClient{

    //openfeign调用失败时回调的方法
    @Override
    public Product getProduct01(Long id) {
        Product product = new Product();
        product.setId(id);
        product.setName("未知产品");
        product.setPrice(new BigDecimal("100.00"));
        return product;
    }
}
